----------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  D:\Dropbox\Migration and Extreme Votes in France - Max & Paul\Data and Codes for submission - PSRM\Figure A1.lo
> g
  log type:  text
 opened on:   1 Feb 2022, 16:47:47

. 
. clear

. 
. use "Figure A1 dataset.dta"

. 
. 
. reg log_fn CAO_period_2 CAO_period_3 CAO_period_4 CAO_period_5 i.period , cluster( codeinsee) absorb(codeinsee)

Linear regression, absorbing indicators         Number of obs     =    167,684
                                                F(7, 33611)       =          .
                                                Prob > F          =          .
                                                R-squared         =     0.8876
                                                Adj R-squared     =     0.8594
                                                Root MSE          =     .19913

                         (Std. Err. adjusted for 33,612 clusters in codeinsee)
------------------------------------------------------------------------------
             |               Robust
      log_fn |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
CAO_period_2 |  -.0132303   .0105031    -1.26   0.208    -.0338167    .0073562
CAO_period_3 |  -.0089398   .0136215    -0.66   0.512    -.0356385    .0177588
CAO_period_4 |   .0050087   .0122645     0.41   0.683    -.0190301    .0290475
CAO_period_5 |   -.054331   .0124865    -4.35   0.000     -.078805    -.029857
             |
      period |
          2  |   .5667195    .001888   300.17   0.000     .5630189    .5704201
          3  |   .8791986   .0021209   414.53   0.000     .8750415    .8833557
          4  |   .9792915    .002124   461.07   0.000     .9751285    .9834546
          5  |   .7732479    .002039   379.22   0.000     .7692513    .7772444
             |
       _cons |   2.441732   .0014516  1682.09   0.000     2.438887    2.444577
------------------------------------------------------------------------------

. 
. capture drop coeff*

. capture drop se*

. capture drop hi*

. capture drop low*

. capture drop time

. 
. gen coeff1=_b[CAO_period_2]

. gen se1=_se[CAO_period_2]

. gen hi1=coeff1+1.96*se1

. gen low1=coeff1-1.96*se1

. 
. 
. gen coeff2=_b[CAO_period_3]

. gen se2=_se[CAO_period_3]

. gen hi2=coeff2+1.96*se2

. gen low2=coeff2-1.96*se2

. 
. 
. gen coeff3=_b[CAO_period_4]

. gen se3=_se[CAO_period_4]

. gen hi3=coeff3+1.96*se3

. gen low3=coeff3-1.96*se3

. 
. gen coeff4=_b[CAO_period_5]

. gen se4=_se[CAO_period_5]

. gen hi4=coeff4+1.96*se4

. gen low4=coeff4-1.96*se4

. 
. 
. capture drop time

. gen time=_n

. replace time=. if time>4
(168,121 real changes made, 168,121 to missing)

. 
. capture drop coeff hi low

. gen coeff=.
(168,125 missing values generated)

. gen hi=.
(168,125 missing values generated)

. gen low=.
(168,125 missing values generated)

. 
. foreach i of numlist 1/4 {
  2. replace coeff=coeff`i' if time==`i'
  3. replace hi=hi`i' if time==`i'
  4. replace low=low`i' if time==`i'
  5. }
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

. 
. twoway (scatter coeff time)(rcap hi low time), graphregion(color(white)) note("95% CI, Coeff of CAO on the log of FN vote 
> (FE regression)") xlab(1 "Pres '12" 2 "Euro' 14" 3 "Reg' 15" 4 "Pres '17",labsize(small)) legend(off) xtitle("") 

. 
. graph export "Figure A1.png", replace
(note: file Figure A1.png not found)
(file Figure A1.png written in PNG format)

. 
. log close
      name:  <unnamed>
       log:  D:\Dropbox\Migration and Extreme Votes in France - Max & Paul\Data and Codes for submission - PSRM\Figure A1.lo
> g
  log type:  text
 closed on:   1 Feb 2022, 16:47:50
----------------------------------------------------------------------------------------------------------------------------
